using System;
using System.Text;
using System.Collections;
using System.Collections.Generic;

namespace WHC.Hotel.BLL
{
    public class BLLFactory<T> where T : class
    {
        private static Hashtable objCache = new Hashtable();
        public static T Instance
        {
            get
            {
                string CacheKey = typeof(T).FullName;
                T bll = (T)objCache[CacheKey];　 //从缓存读取  
                if (bll == null)
                {
                    bll = Reflect<T>.Create(typeof(T).Name, "WHC.Hotel.BLL"); //反射创建，并缓存
                }
                return bll;
            }
        }
    }    
}
